﻿#region using statements

using System.Collections.Generic;

using Microsoft.Xna.Framework;

#endregion

namespace NGen.Managers.GameObject
{
	/// <summary>
	/// 	Interface for the IManagerGameObjects2D
	/// </summary>
	public interface IManagerGameObjects : IGameManager
	{
		///<summary>
		///	transform matrix used in the spritebatch draw call to transform all game objects
		///</summary>
		Matrix TransformMatrix { get; set; }

		/// <summary>
		/// 	Adds the object to the manager for automatic updating and drawing
		/// </summary>
		/// <param name = "p_gameObject">object to add</param>
		/// <returns>the unique object id</returns>
		uint AddObject(GameObject p_gameObject);

		/// <summary>
		/// 	Checks to make sure an object exists
		/// </summary>
		/// <param name = "p_objectId">the id number of the object to check</param>
		/// <returns>true if the object is in the registry, false otherwise</returns>
		bool GameObjectExists(uint p_objectId);

		/// <summary>
		/// 	Returns the object if it exists
		/// </summary>
		/// <param name = "p_objectId">the object id</param>
		/// <returns>the object whose id was passed in</returns>
		GameObject GetGameObjectById(uint p_objectId);

		/// <summary>
		/// 	Returns the object if it exists, casted to the type passed in
		/// </summary>
		/// <param name = "p_objectId">the object id</param>
		/// <typeparam name = "TCastType">the type to which the object is casted</typeparam>
		/// <returns>the object whose id was passed in</returns>
		TCastType GetGameObjectById<TCastType>(uint p_objectId) where TCastType : GameObject;

		/// <summary>
		/// 	Returns a list containing all of the unique object identifiers
		/// </summary>
		/// <returns>the list of all unique object identifiers</returns>
		List<uint> GetGameObjectIdList();

		/// <summary>
		/// 	Destroy all of the objects in the manager
		/// </summary>
		void DestroyAllGameObjects();

		/// <summary>
		/// 	Destroys a specific game object
		/// </summary>
		/// <param name = "p_objectId">the id of the game object to destroy</param>
		void DestroyGameObjectById(uint p_objectId);
	}
}